package top.truism.auth.common;

import top.truism.auth.web.pojo.User;

public final class LocalUser {

  private static ThreadLocal<User> localUser = new ThreadLocal<>();

  public static void setLocalUser(User user) {
    localUser.set(user);
  }

  public static User getLocalUser() {
    return localUser.get();
  }

  public static void removeLocalUser() {
    localUser.remove();
  }

}
